package com.rysima.wjsima.demo;

import java.io.*;

public class Demo2 {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("D:\\hhh.png");
        BufferedInputStream bis = new BufferedInputStream(fis);
        FileOutputStream fos = new FileOutputStream("D:\\sd.png");
        BufferedOutputStream bos = new BufferedOutputStream(fos);
        int b;
        byte[] bytes = new byte[1024 * 8 ];
        while ((b = bis.read(bytes)) != -1){
            bos.write(bytes,0,b);
            bos.flush();
        }
        bis.close();
        bos.close();
    }
}
